﻿<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="Bookmark" href="favicon.ico" >
<link rel="Shortcut Icon" href="favicon.ico" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css" />

<link rel="stylesheet" type="text/css" href="static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/style.css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script><![endif]-->
<!--/meta 作为公共模版分离出去-->
<title>基地报名</title>

	<link rel="stylesheet" href="webjars/layui/2.4.5/css/layui.css">
	<script src="webjars/layui/2.4.5/layui.js"></script>

</head>
<body>
<!--_header 作为公共模版分离出去-->
<div th:replace="common/header::header"></div>
<!--_menu 作为公共模版分离出去-->
<div th:replace="common/menu::menu"></div>

<section class="Hui-article-box">
	<nav class="breadcrumb"><i class="Hui-iconfont"></i> <a href="/index" class="maincolor">首页</a>
		<span class="c-999 en">&gt;</span><span class="c-666">学校中心</span>
		<span class="c-999 en">&gt;</span><span class="c-666">基地管理</span></nav>
	<div class="Hui-article">
		<article class="cl pd-20">
			<div class="panel panel-default">
				<div class="panel-header">基地管理</div>
				<div class="panel-body">
					<div class="text-c">
						基地编号：<input type="text" class="input-text radius mr-5" style="width:210px" name="">
						公司：
						<span class="select-box mr-5 radius" style="width:210px">
						  <select class="select " size="1" name="demo1">
							   <option value="" selected>全部公司</option>
							<option value="1">阿里巴巴</option>
							<option value="2">腾讯</option>
							<option value="3">华为</option>
						  </select>
						</span>
						基地状态状态：<span class="select-box mr-5 radius" style="width:210px">
						  <select class="select " size="1" name="demo1">
							  <option value="" selected>全部</option>
							<option value="1">已启用</option>
							<option value="2">已停用</option>
							<option value="2">待审核</option>
						  </select>
						</span>
						<button type="submit" class="btn btn-success radius" name=""><i class="Hui-iconfont"></i> 查询</button>
					</div>
				</div>
			</div>
			<div class="mt-20">
				<table class="table table-border table-bordered table-striped table-hover">
					<tbody class="text-c">
					<tr>
						<td>基地编号</td>
						<td>基地所属公司</td>
						<td>实训老师</td>
						<td>报名人数</td>
						<td>基地状态</td>
						<td>操作</td>
					</tr>
					<tr>
						<td><a th:href="@{/baseDetails}" class="c-primary">2001</a></td>
						<td>阿里巴巴</td>
						<td>马云</td>
						<td><a th:href="@{/enrolledStudents}" class="c-primary">25/50</a></td>
						<td class="td-status"><span class="label label-success radius">已启用</span></td>
						<td class="td-manage">
							<a style="text-decoration:none" onClick="base_stop(this,'10001')" href="javascript:;" title="停用"><i class="Hui-iconfont">&#xe6de;</i></a>
							<a style="text-decoration:none" class="ml-10 disabled" onClick="base_review(this,'2001')" href="javascript:;" title="审核"><i class="Hui-iconfont">&#xe6df;</i></a>
							<a style="text-decoration:none" class="ml-10" onClick="base_del(this,'10001')" href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe6e2;</i></a>
						</td>
					</tr>
					<tr>
						<td><a th:href="@{/baseDetails}" class="c-primary">2001</a></td>
						<td>阿里巴巴</td>
						<td>马云</td>
						<td><a th:href="@{/enrolledStudents}" class="c-primary">25/50</a></td>
						<td class="td-status"><span class="label label-danger radius">待审核</span></td>
						<td class="td-manage">
							<a style="text-decoration:none" class="disabled" onClick="base_start(this,'10001')" href="javascript:;" title="启用"><i class="Hui-iconfont">&#xe603;</i></a>
							<a style="text-decoration:none" class="ml-10" onClick="base_review(this,'2001')" href="javascript:;" title="审核"><i class="Hui-iconfont">&#xe6df;</i></a>
							<a style="text-decoration:none" class="ml-10" onClick="base_del(this,'10001')" href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe6e2;</i></a>
						</td>
					</tr>
					<tr>
						<td><a th:href="@{/baseDetails}" class="c-primary">2001</a></td>
						<td>阿里巴巴</td>
						<td>马云</td>
						<td><a th:href="@{/enrolledStudents}" class="c-primary">25/50</a></td>
						<td class="td-status"><span class="label label-success radius">已启用</span></td>
						<td class="td-manage">
							<a style="text-decoration:none" onClick="base_stop(this,'10001')" href="javascript:;" title="停用"><i class="Hui-iconfont">&#xe6de;</i></a>
							<a style="text-decoration:none" class="ml-10 disabled" onClick="base_review(this,'2001')" href="javascript:;" title="审核"><i class="Hui-iconfont">&#xe6df;</i></a>
							<a style="text-decoration:none" class="ml-10" onClick="base_del(this,'10001')" href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe6e2;</i></a>
						</td>
					</tr>
					<tr>
						<td><a th:href="@{/baseDetails}" class="c-primary">2001</a></td>
						<td>阿里巴巴</td>
						<td>马云</td>
						<td><a th:href="@{/enrolledStudents}" class="c-primary">25/50</a></td>
						<td class="td-status"><span class="label label-success radius">已启用</span></td>
						<td class="td-manage">
							<a style="text-decoration:none" onClick="base_stop(this,'10001')" href="javascript:;" title="停用"><i class="Hui-iconfont">&#xe6de;</i></a>
							<a style="text-decoration:none" class="ml-10 disabled" onClick="base_review(this,'2001')" href="javascript:;" title="审核"><i class="Hui-iconfont">&#xe6df;</i></a>
							<a style="text-decoration:none" class="ml-10" onClick="base_del(this,'10001')" href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe6e2;</i></a>
						</td>
					</tr>
					<tr>
						<td><a th:href="@{/baseDetails}" class="c-primary">2001</a></td>
						<td>阿里巴巴</td>
						<td>马云</td>
						<td><a th:href="@{/enrolledStudents}" class="c-primary">25/50</a></td>
						<td class="td-status"><span class="label radius">已停用</span></td>
						<td class="td-manage">
							<a style="text-decoration:none" onClick="base_start(this,'10001')" href="javascript:;" title="启用"><i class="Hui-iconfont">&#xe603;</i></a>
							<a style="text-decoration:none" class="ml-10 disabled" onClick="base_review(this,'2001')" href="javascript:;" title="审核"><i class="Hui-iconfont">&#xe6df;</i></a>
							<a style="text-decoration:none" class="ml-10" onClick="base_del(this,'10001')" href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe6e2;</i></a>
						</td>
					</tr>

					</tbody>
				</table>

				<div id="demo7"></div>
			</div>
		</article>
	</div>

</section>

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript">
	/*基地停用*/
	function base_stop(obj,id){
		layer.confirm('确认要停用基地吗？',function(index){
			$(obj).parents("tr").find(".td-manage").prepend('<a style="text-decoration:none" onClick="base_start(this,id)" href="javascript:;" title="启用"><i class="Hui-iconfont">&#xe603;</i></a>');
			$(obj).parents("tr").find(".td-status").html('<span class="label  radius">已停用</span>');
			$(obj).remove();
			layer.msg('已停用!',{icon: 5,time:1000});
		});
	}

	/*基地启用*/
	function base_start(obj,id){
		layer.confirm('确认要启用基地吗？',function(index){
			$(obj).parents("tr").find(".td-manage").prepend('<a style="text-decoration:none" onClick="base_stop(this,id)" href="javascript:;" title="停用"><i class="Hui-iconfont">&#xe6de;</i></a>');
			$(obj).parents("tr").find(".td-status").html('<span class="label label-success radius">已启用</span>');
			$(obj).remove();
			layer.msg('已启用!',{icon: 6,time:1000});
		});
	}

	/*基地审核*/
	function base_review(obj,id){
		layer.confirm('基地是否审核通过？',function(index){
			$(obj).prev().removeClass("disabled");
			//$(obj).parents("tr").find(".td-manage").prepend('<a style="text-decoration:none" onClick="base_start(this,id)" href="javascript:;" title="启用"><i class="Hui-iconfont">&#xe603;</i></a>');
			$(obj).parents("tr").find(".td-status").html('<span class="label label-defaunt radius">已停用</span>');
			$(obj).addClass("disabled");
			//$(obj).unbind();
			layer.msg('审核通过!',{icon: 6,time:1000});
		});
	}

	/*基地删除*/
	function base_del(obj,id){
		layer.confirm('确认要删除基地吗？',function(index){
			$(obj).parents("tr").remove();
			layer.msg('已删除!',{icon:1,time:1000});
		});
	}

	layui.use(['laypage', 'layer'], function(){
		var laypage = layui.laypage,layer = layui.layer;

		//完整功能
		laypage.render({
			elem: 'demo7',
			count: 100,
			layout: ['count', 'prev', 'page', 'next', 'limit', 'refresh', 'skip'],
			jump: function(obj){
				console.log(obj)
			}
		});
	})


</script>
<!--/请在上方写此页面业务相关的脚本-->
<style>
	.disabled{
		pointer-events: none;
	}
</style>
</body>
</html>